package com.pai4j.pgc.dao.community;
import com.pai4j.pgc.entity.community.DictConfigEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 *
 * @author: CYM-pai
 * @date: 2025/10/27 15:16
 **/
@Repository
public interface IDictConfigDAO extends JpaSpecificationExecutor<DictConfigEntity>, JpaRepository<DictConfigEntity, Long> {


    DictConfigEntity findAllById(Long id);
    DictConfigEntity findAllByCode(String code);

    List<DictConfigEntity> findAllByCodeAndStatusOrderByScoreDesc(String code, Boolean status);

    List<DictConfigEntity> findAllByCodeAndNameAndStatusOrderByScoreDesc(String code, String name, Boolean status);
}
